/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exampleclient;

import cageballclient.Client;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author kanonas
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Properties conf = new Properties();
        try {
            conf.load(new FileInputStream(args[0]));

            String ip = conf.getProperty("ip");
            int port = Integer.parseInt(conf.getProperty("port"));

            Client game = new Client(ip, port, new ExampleAI());

            new Thread(game).start();
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
